#include"sharemem.hpp"
#include"Time.hpp"
#include<string.h>
#include"Fifo.hpp"

int main()
{
    mem.CreatShm();
    mem.AttachShm();
    fifo.Fifoforread();
    struct data* image = (struct data*)mem.GetAddr();
    int n = 10;
    while(n--)
    {
        fifo.wait();
        std::cout<<image->status<<std::endl;
        std::cout<<image->lasttime<<std::endl;
        std::cout<<image->image<<std::endl;
        strcpy(image->status, "过期");
        sleep(2);
    }
    mem.DetachShm();

    return 1;
}